<template>
  <div class="">
    <p>count is {{ count }} ,doubleCount is {{ doubleCount }}</p>
  </div>
</template>

<script setup>
import { ref, computed } from 'vue'
const count = ref(1)
/**
 * computed 内部接收的是一个箭头函数，它里面必须要有返回值
 */
const doubleCount = computed(() => {
  // 计算属性，必须要有返回值
  return count.value * 2
})
</script>

<style scoped></style>
